package com.neusoft.po;

import java.util.Date;

/**
 * 钱包交易实体类，包含交易ID、用户ID、交易金额、交易类型、交易日期、出账账户和入账账户。
 */
public class WalletTransaction {
    private Integer transactionId; // 交易ID
    private String userId; // 用户ID
    private String fromUserId; // 出账用户ID
    private String toUserId; // 入账用户ID
    private Double amount; // 交易金额
    private String type; // 交易类型（充值、提现、转账）
    private Date date; // 交易日期

    // Constructors
    public WalletTransaction() {}

    /**
     * 带参数的构造函数。
     * @param transactionId 交易ID
     * @param userId 用户ID
     * @param fromUserId 出账用户ID
     * @param toUserId 入账用户ID
     * @param amount 交易金额
     * @param type 交易类型
     * @param date 交易日期
     */
    public WalletTransaction(Integer transactionId, String userId, String fromUserId, String toUserId, Double amount, String type, Date date) {
        this.transactionId = transactionId;
        this.userId = userId;
        this.fromUserId = fromUserId;
        this.toUserId = toUserId;
        this.amount = amount;
        this.type = type;
        this.date = date;
    }

    // Getters and Setters

    public Integer getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(Integer transactionId) {
        this.transactionId = transactionId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getFromUserId() {
        return fromUserId;
    }

    public void setFromUserId(String fromUserId) {
        this.fromUserId = fromUserId;
    }

    public String getToUserId() {
        return toUserId;
    }

    public void setToUserId(String toUserId) {
        this.toUserId = toUserId;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public void setTransaction(Integer transactionId, String userId, String fromUserId, String toUserId, Double amount, String type, Date date) {
        this.transactionId = transactionId;
        this.userId = userId;
        this.fromUserId = fromUserId;
        this.toUserId = toUserId;
        this.amount = amount;
        this.type = type;
        this.date = date;
    }
}
